The present invention relates to a method for deinterlacing and scaling interlaced images, as well as scaling progressive scanned and computer generated images.
Interlaced video is transmitted on a field-by-field basis, where each field contains one half of the image content. An image can be separated into two halves, wherein the first half comprises alternating rows starting with the first row (the odd field) and the second half comprises alternating rows starting with the second row (the even field). A scanner at an image scene captures the even lines in the image scene and transmits them. The scanner then captures the odd lines in the image scene and transmits them. The even and odd fields are typically not from the exact same image scene, but are temporally displaced. The temporally displaced even and odd fields are received and displayed on an interlaced monitor. An interlaced monitor is designed to display these fields one after another in a manner that is consistent with the way they were generated.
The terms, current field (CF) and previous field (PF) are used to denote fields that are temporally adjacent, whether they are even or odd. The current field either lags or leads the previous field. If the previous field is even, then the current field is odd and visa-versa.
In North America, interlaced signals have been broadcast using the National Television Standards Committee (NTSC) television format. Recently, standards have been adopted for the transmission of signals to be displayed on progressive scan display devices as well as on larger interlaced formats. Progressive scan devices display the even and odd fields as though there is no temporal displacement between them.
The problem with converting an interlaced image sequence to a progressive sequence is a challenging one. If the conversion is done improperly, visual artifacts appear that are displeasing to a human observer. Deinterlacing requires rendering (or interpolating) the missing field. Several approaches have been implemented in attempts to achieve this goal.
One approach to deinterlacing interlaced fields for display on a progressive monitor is to ignore the temporal latency and xe2x80x9cjamxe2x80x9d the odd field together with The even field, which are then displayed on the screen. This process is referred to as field meshing. Field meshing works well when an image is static, but performs poorly when there is a visibly significant structure, such a line or an edge, in the image that is in motion. For example, a vertical line that is moving horizontally across the image will appear broken, as there is a temporal displacement between the adjacent and current fields equal to the physical displacement the line undergoes in the horizontal direction in {fraction (1/60)}th of a second.
An alternate approach to deinterlacing is referred to as line doubling. Line doubling is a process whereby lines in the current field are duplicated in the previous field. The duplicate lines are subsequently displayed on the progressive display device. However, line doubling can cause a loss of detail in the image. Improvements on creating an previous field from a current field can be achieved using a filter to interpolate the current field to produce the previous field data. However, this improvement still ignores all the previous field data, much of which may be spatially relevant.
Traditionally, resizing an image has been done using linear techniques. A finite impulse response (FIR) filter is used to compute a target image. The target image is either larger or smaller in size than the source image. The source image is convolved with the filter to create The output image. Unfortunately, the end result is not often visually satisfactory because linear filters cannot faithfully reproduce, or preserve, the high contrast structures such as edges in many images that are graphically generated by a computer.
For instance, using a linear filter which is xe2x80x9csharpxe2x80x9d, that is it has significant high frequency gain, will result in a target image that is prone to exhibit xe2x80x9cringingxe2x80x9d. This type of phenomenon is called the Gibbs effect. The Gibbs effect manifests itself visually as a visual echo or visual ripple that surrounds the structure in question.
Alternatively, if the filter is too xe2x80x9csoftxe2x80x9d, that is it has more high frequency attenuation, the resulting target image will transform structures so that they are perceived as blurry. Neither a soft nor a sharp linear filter is adequate.
It is an object of the present invention to obviate or mitigate at least some of the above mentioned disadvantages.
In accordance with an aspect of the present invention there is provided a method of calculating a target pixel for scaling an image comprising a plurality of source pixels. The method includes the following steps. A contour is determined in the image using at least one of a first set of predetermined parameters. A filter tap configuration is adaptively selected from a predefined set of filter tap configurations in accordance with the determined contour. The predefined set of configurations includes a plurality of non-linear filter tap configurations. The target pixel is calculated by selectively convolving ones of the plurality of source pixels along a locus of the selected filter tap configuration with a weighting factor, and combining the convolved pixels.
In accordance with yet another aspect of the present invention there is provided a system for calculating a target pixel for scaling an image comprising a plurality of source pixels. The system comprising the following components. A plurality of calculation units for calculating values for a first set of predetermined parameters. A filter selector for selecting a filter tap configuration from a set of filter tap configurations in accordance with the fist set of predetermined parameters. The set of filter tap configurations includes non-linear filter tap configurations. A convolution unit for convolving selected ones of the plurality of source pixels along a locus of the selected filter tap configuration with predetermined weighting factors. An output for combining the convolved pixels for calculating the target pixel.